﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Scripts/jquery-easyui-1.5.3/themes/bootstrap/css")
    @Styles.Render("~/Scripts/jquery-easyui-1.5.3/themes/css")
    @Styles.Render("~/Content/bootstrap")
    @Scripts.Render("~/bundles/modernizr")

    @*@Scripts.Render("~/Scripts/layout")*@

    <script type="text/javascript" src="~/Scripts/jquery-2.1.3.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.form.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>

    <script type="text/javascript" src="~/Scripts/bootstrap.min.js"></script>

    <script type="text/javascript" src="~/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.extension.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.bootstrap.tooltip.js"></script>

    <script type="text/javascript" src="~/Scripts/common.js"></script>


    <script type="text/javascript">
        $(document).ready(function () {
            $("form").ajaxForm({
                beforeSubmit: commonApiOnSubmit,
                success: commonApiCallback,
                error: commonApiCallbackError
            });
        });

        function commonApiOnSubmit() {
            $('#commonApiResult').html("");
            $('#loaddingModal').modal({
                keyboard: false
            });
        }

        function commonApiCallback(data) {
            $('#commonApiResult').html(data);
            $('#loaddingModal').modal('hide');
        }

        function commonApiCallbackError(xhr, status, error) {
            $('#loaddingModal').modal('hide');
            $('#commonApiResult').html("<span class='errorMessage'>后台服务发生异常</span>");
        }
    </script>

</head>
<body>
    <div class="container-fluid css-layout-container">
        <div class="row">
            <div class="col-lg-12">
                @RenderBody()
                <hr />
                <div class="form-group">
                    <div class="easyui-panel" id="commonApiResult" title="结果" style="min-height:300px;">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--提示模块框-->
    <div class="modal fade" tabindex="-1" id="loaddingModal" role="dialog" aria-hidden="false" data-backdrop="false">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="progress">
                        <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
                            正在执行操作...
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    @RenderSection("scripts", required: false)

</body>
</html>
